var copyRight = localStorage.getItem("copyRight");

//document.writeln(' <script type="text/javascript">')
//document.writeln(" $(function(){")
//document.writeln("       $(\".footer\").append(\"<div class=\'copyright\'>\"+  copyRight +\"</div>\");");
//document.writeln("  })</script>")



if( token ){
    $("#index-user-name").attr("href","javascript:;")
    $("#index-user-name i").html(localStorage.getItem("userName"))
}else{
    $("#index-user-name").attr("href","login.html")
    $("#index-user-name i").html("请登录")
}

$(".index-logout").click(function(){
    localStorage.removeItem("token")
    localStorage.removeItem("userName")
    localStorage.removeItem("userGrade")
    $.removeCookie('token');
    $.removeCookie("token",{path:basePath})
    $.cookie("token",null,{path:"/"+webContext} )
})


